﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FoneBuddy.LinqModel.Data;

namespace FoneBuddy.LinqModel
{
   public partial class Merchant
    {
        #region Variable Declaration
        private IDataRepository _dataObject;
        #endregion

        public Merchant(IDataRepository dataObject)
            : this()
        {
            _dataObject = dataObject;
        }
        public void Create()
        {
             _dataObject.CreateMerchant(this);
        }
        public void GetMerchantByEmailId()
        {
            _dataObject.GetMerchantByEmailId(this);
        }
        public List<Merchant> GetAll()
        {
            return _dataObject.GetAllMerchant();
        }
        public List<Merchant> GetActive()
        {
            return _dataObject.GetAllActiveMerchant();
        }
        public List<Merchant> GetInactive()
        {
            return _dataObject.GetAllInActiveMerchant();
        }
        public void UpdateLoginInfo()
        { _dataObject.UpdateLoginInfo(this); }

        public void GetMerchantById()
        {
            _dataObject.GetMerchantById(this);
        }
        public string[] IsValidLogin()
        {
            return _dataObject.IsValidLogin(this);
        }
        public void UpdateContactName()
        {
            _dataObject.UpdateContectName(this);
        }
    }
}
